import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '/',
      redirect: '/pages/login/index'
    },
    {
      name: 'redirect',
      path: '/pages/redirect/index',
      component: () => import('@/views/redirect/index')
    },
    {
      name: 'index',
      path: '/pages/index/index',
      component: () => import('@/views/index/index')
    },
    {
      name: 'login',
      path: '/pages/login/index',
      component: () => import('@/views/login/index')
    },
    {
      name: 'homework_index',
      path: '/pages/homework/index/index',
      component: () => import('@/views/homework/index/index'),
      meta: { keepAlive: true }
    },
    {
      name: 'homework_todo_question_xkw',
      path: '/pages/homework/todo/question/xkw/index',
      component: () => import('@/views/homework/todo/question/xkw/index')
    },
    {
      name: 'homework_todo_question_english',
      path: '/pages/homework/todo/question/english/index',
      component: () => import('@/views/homework/todo/question/english/index')
    },
    {
      name: 'homework_scantron',
      path: '/pages/homework/scantron/index',
      component: () => import('@/views/homework/scantron/index')
    },
    {
      name: 'homework_detail_question_xkw_index',
      path: '/pages/homework/detail/question/xkw/index',
      component: () => import('@/views/homework/detail/question/xkw/index')
    },
    {
      name: 'homework_detail_question_english_index',
      path: '/pages/homework/detail/question/english/index',
      component: () => import('@/views/homework/detail/question/english/index')
    },
    {
      name: 'homework_detail_question_english_choose',
      path: '/pages/homework/detail/question/english/choose/index',
      component: () => import('@/views/homework/detail/question/english/choose/index')
    },
    {
      name: 'homework_detail_question_english_dialogue',
      path: '/pages/homework/detail/question/english/dialogue/index',
      component: () => import('@/views/homework/detail/question/english/dialogue/index')
    },
    {
      name: 'homework_detail_question_english_read',
      path: '/pages/homework/detail/question/english/read/index',
      component: () => import('@/views/homework/detail/question/english/read/index')
    },
    {
      name: 'homework_detail_question_english_fill',
      path: '/pages/homework/detail/question/english/fill/index',
      component: () => import('@/views/homework/detail/question/english/fill/index')
    },
    {
      name: 'homework_detail_question_english_picture',
      path: '/pages/homework/detail/question/english/picture/index',
      component: () => import('@/views/homework/detail/question/english/picture/index')
    },
    {
      name: 'homework_detail_question_english_fill_picture',
      path: '/pages/homework/detail/question/english/fill-picture/index',
      component: () => import('@/views/homework/detail/question/english/fill-picture/index')
    },
    {
      name: 'homework_explanation',
      path: '/pages/homework/explanation/index',
      component: () => import('@/views/homework/explanation/index')
    }
  ],
  mode: 'hash'
})

export default router
